package luj.game.robot.internal.concurrent.parent;

import akka.actor.ActorRef;
import luj.cluster.api.actor.ActorMessageHandler;
import luj.cluster.api.actor.Tellable;
import luj.game.robot.internal.concurrent.instance.RobotInstanceDependency;
import luj.game.robot.internal.instance.boss.state.BossState;

import java.util.ArrayList;
import java.util.List;

public class RobotParentActor {

  public interface Handler<M> extends ActorMessageHandler<RobotParentActor, M> {
    // NOOP
  }

  public RobotParentActor(BossState bossState, RobotBossDependency bossDependency, RobotInstanceDependency workerDependency, Tellable adminRef) {
    _bossState = bossState;
    _bossDependency = bossDependency;
    _workerDependency = workerDependency;
    _adminRef = adminRef;
  }

  public BossState getBossState() {
    return _bossState;
  }

  public RobotBossDependency getBossDependency() {
    return _bossDependency;
  }

  public List<ActorRef> getRobotList() {
    return _robotList;
  }

  public RobotInstanceDependency getWorkerDependency() {
    return _workerDependency;
  }

  public Tellable getAdminRef() {
    return _adminRef;
  }

  private final BossState _bossState;
  private final RobotBossDependency _bossDependency;

  private final List<ActorRef> _robotList = new ArrayList<>();
  private final RobotInstanceDependency _workerDependency;

  private final Tellable _adminRef;
}
